#include "stdafx.h"
#include "GameStateObject.h"
#include "Time/TimeManager.h"

#include "World/World.h"

using namespace std;
using namespace ZeEngine;

GameStateObject::GameStateObject()
{
}


GameStateObject::~GameStateObject()
{
}

bool GameStateObject::Init(GameEngine& gameEngine)
{
    m_timerManager = make_unique<TimeManager>();
    m_timerManager->Start();

    m_pWorld = make_unique<World>(gameEngine);

    return m_pWorld->Init(gameEngine);
}

void GameStateObject::Update(GameEngine& gameEngine)
{
    m_timerManager->UpdateClock(gameEngine.GetDeltaMS());
}

void GameStateObject::ClearEntitiesOfInterest()
{

}

void GameStateObject::AddEntityOfInterest(Entity* pEntity)
{
    m_intersectingEntities.push_back(pEntity);
}